package com.thinkgem.jeesite.modules.devmng.web;

import com.thinkgem.jeesite.common.annotation.MobileApi;
import com.thinkgem.jeesite.modules.devmng.service.DevchkItemService;
import com.thinkgem.jeesite.modules.devmng.vo.DevchkItemVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by admin on 2017-12-6.
 */
@MobileApi
@RestController
@RequestMapping("/mobile-api/devchkItem")
public class DevchkItemMobileController {

    @Autowired
    private DevchkItemService devchkItemService;

    @RequestMapping(value = "/findListByTaskMainIdAndDeviceMainId", method = RequestMethod.GET)
    public List<DevchkItemVo> findListByTaskMainIdAndDeviceMainId(@RequestParam("taskMainId") String taskMainId,
                                                                  @RequestParam("deviceMainId") String deviceMainId) {
        return devchkItemService.findListByTaskMainIdAndDeviceMainId(taskMainId, deviceMainId);
    }

    @RequestMapping(value = "/viewResult", method = RequestMethod.GET)
    public List<DevchkItemVo> viewResult(@RequestParam("taskMainId") String taskMainId,
                                         @RequestParam("deviceMainId") String deviceMainId) {
        return devchkItemService.viewResult(taskMainId, deviceMainId);
    }

}
